<script setup lang="ts">
import { NConfigProvider, GlobalThemeOverrides } from "naive-ui";
import { darkTheme, lightTheme } from "naive-ui";
import { zhCN } from "naive-ui";
import { useAppStore } from "./stores/app";

const appStore = useAppStore();

const themeOverrides: GlobalThemeOverrides = {
  common: {
    // primaryColor: "#409EFF",
  },
};
</script>

<template>
  <n-config-provider
    :theme="appStore.darkTheme ? darkTheme : lightTheme"
    :locale="appStore.isLangZhCn ? zhCN : null"
    :theme-overrides="themeOverrides"
  >
    <router-view></router-view>
  </n-config-provider>
</template>
